// 对外暴露配置路由
export const constRoutes = [
  {
    path: '/login',
    name: 'login', // 命名路由
    component: () => import('@/views/login/login_index.vue'),
    meta: {
      title: '登录', // 路由标题
      hidden: true, // 菜单隐藏
      icon: 'Promotion', // 菜单图标
    }, // 当前路由信息
  },
  {
    path: '/',
    name: '/layout',
    redirect: '/home',
    component: () => import('@/layout/layout_index.vue'),
    meta: { title: '', hidden: false, icon: '' },
    children: [
      {
        path: '/home',
        name: 'home',
        component: () => import('@/views/home/home_index.vue'),
        meta: { title: '首页', hidden: false, icon: 'HomeFilled' },
      },
    ],
  },

  {
    path: '/dashboard',
    name: 'dashboard',
    component: () => import('@/views/dashboard/dashboard_index.vue'),
    meta: { title: '数据大屏', hidden: false, icon: 'Platform' },
  },
  {
    path: '/acl',
    name: 'Acl',
    component: () => import('@/layout/layout_index.vue'),
    redirect: '/acl/user',
    meta: { title: '权限管理', hidden: false, icon: 'Lock' },
    children: [
      {
        path: '/acl/user',
        name: 'User',
        component: () => import('@/views/acl/user/user_index.vue'),
        meta: { title: '用户管理', hidden: false, icon: 'User' },
      },
      {
        path: '/acl/role',
        name: 'Role',
        component: () => import('@/views/acl/role/role_index.vue'),
        meta: { title: '角色管理', hidden: false, icon: 'UserFilled' },
      },
      {
        path: '/acl/permission',
        name: 'Permission',
        component: () => import('@/views/acl/permission/permission_index.vue'),
        meta: { title: '菜单管理', hidden: false, icon: 'Monitor' },
      },
    ],
  },
  {
    path: '/product',
    name: 'Product',
    component: () => import('@/layout/layout_index.vue'),
    redirect: '/product/trademark',
    meta: { title: '商品管理', hidden: false, icon: 'Goods' },
    children: [
      {
        path: '/product/trademark',
        name: 'Trademark',
        component: () => import('@/views/product/trademark/trademark_index.vue'),
        meta: { title: '品牌管理', hidden: false, icon: 'ShoppingCartFull' },
      },

      {
        path: '/product/attr',
        name: 'Attr',
        component: () => import('@/views/product/attr/attr_index.vue'),
        meta: { title: '属性管理', hidden: false, icon: 'ChromeFilled' },
      },

      {
        path: '/product/sku',
        name: 'Sku',
        component: () => import('@/views/product/sku/sku_index.vue'),
        meta: { title: 'SKU管理', hidden: false, icon: 'Grid' },
      },
      {
        path: '/product/spu',
        name: 'Spu',
        component: () => import('@/views/product/spu/spu_index.vue'),
        meta: { title: 'SPU管理', hidden: false, icon: 'Orange' },
      },
    ],
  },
  {
    path: '/404',
    name: '404',
    component: () => import('@/views/404/404_index.vue'),
    meta: { title: '404', hidden: true, icon: '' },
  },
  {
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: { title: '404', hidden: true, icon: '' },
  },
]
